<div id="forgetBoxStyle">
<div class="successResultForgetPassword errorMessage"></div>
<div class="forget-form">
    <?php
    $form = $this->beginWidget('GxActiveForm', array(
        'id' => 'forget-form',
        'action' => Yii::app()->createUrl('users/forgetpassword'),
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
            'validateOnChange' => true,
            'enableAjaxValidation' => true,
        ),
        'htmlOptions' => array('class' => 'form',
            'role' => "form")
    ));
    ?>
    <div class="notice"> Fields with <span class="red">*</span> are required   </div>
    <div class="errorMessage"></div>
    <div class="form-group">
        <label for="inputEmail3" class="col-lg-5 col-sm-5 col-md-5 ">Email-Address<span class="red">*</span>:</label>
        <div class="col-sm-7 col-sm-7 col-md-7 mopo">
            <?php echo $form->textField($model, 'username', array('class' => 'form-control txtinput')); ?>                            
            <div class="errorMessage" id="forget-formLoder-username"></div>
        </div>
    </div>
    <div class="gap"></div>

    <div class="click">

        <?php
        echo CHtml::ajaxSubmitButton('Submit', Yii::app()->createUrl('/users/forgetpassword'), array(
            'dataType' => 'json',
            'type' => 'post',
            'success' => 'function(data) { 
                                    $("#loginLoder").hide();                                
                                if(data.status) {
                                $(".forget-form").hide();
                                $(".successResultForgetPassword").text("Change Password link send your mail.");
                            }else{  
                             $("#forget-formLoder").hide();    $("#forget-formLoder-username").text(data.error);                       
                                       }}',
            'beforeSend' => 'function(){                        
                           $("#forget-formLoder").show();
                          
                      }'
                ), array('class' => '', 'id' => 'forgetbtn', 'name' => 'forget'));
        ?>
        <div id="forget-formLoder" style="display: none"><img src="<?php echo ThemePath(); ?>/images/myskill.gif"></img></div> 
    </div>
    <div class="gap"></div>
    <?php $this->endWidget(); ?>
</div>
</div>